/*
 * @Author: liuyongjian
 * @Date: 2022-01-06 10:57:40
 * @Last Modified by: liuyongjian
 * @LastEditTime: 2022-01-06 14:44:32
 */
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
// import Home from '../views/Home.vue'
const index = () => import('@/views/index.vue')
const email = () => import('@/views/email.vue')
const shortUrl = () => import('@/views/shortUrl.vue')

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    component: index,
    children: [
      {
        path: '/email',
        name: 'email',
        component: email
      },
      {
        path: '/shortUrl',
        name: 'shortUrl',
        component: shortUrl
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
